package com.lw.edu.api;

import com.lw.commonutil.result.Result;
import com.lw.edu.entity.subject.OneSubject;
import com.lw.edu.service.SubjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/edu/subject")
public class SubjectApiController {
    @Autowired
    private SubjectService subjectService;
    //课程分类列表（树形）
    @GetMapping("/getAllSubject")
    public Result getAllSubject(){
        List<OneSubject> list=subjectService.getAllSubject();
        return Result.ok( list );
    }
}
